/**
 * 具体通知者
 * @author liaosh
 * @date 2022-10-16 19:37
 */
public class Secretary extends Subject {

    @Override
    public void attach(Observer observer) {
        observers.add(observer);
    }

    @Override
    public void detach(Observer observer) {
        observers.remove(observer);
    }

    @Override
    public void notifyObserver() {
        for (Observer observer : observers) {
            observer.update();
        }
    }
}
